home *** CD-ROM | disk | FTP | other *** search
/ New Perspectives on Computer Concepts / New Perspectives on Computer Concepts.iso / np2010c / page759.pag < prev    next >
Portable Network Graphic  |  2008-10-02  |  100KB  |  817x1045  |  8-bit (256 colors)
Labels: chat room | hakham | monitor | plant | sky
OCR: COMPUTER PROGRAMMING 691 So far, the algorithm describes how to calculate the price per square inch of one pizza. It should specify similar process for calculating the price per square inch of the second pizza Finally, the algorithm should specify how the computer decides what to dis- play as the solution You want the computer to display message indicating which pizza has the lowest square-inch cost so your algorithm should include steps like the following: SquarelnchPrice1 is less than SquarelnchPrice2 then display the message "Pizza 1 is the best deal SquarelnchPrice2 is less than SquarelnchPrice1 then display the message "Pizza 2 is the best deal But don't forget to indicate what you want the computer to do if the price per square inch the same for both pizzas: FIGURE 12-21 SquarelnchPr ...